﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CommunitySystemModel;

namespace CommunitySystem.Web.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“ZhaoLuService”。
    public class ZhaoLuService : IZhaoLuService
    {
        private ZhaoLuBO bo = new ZhaoLuBO();
        public ObservableCollection<ZhaoLuZhiWeiModel> GetZhaoLuZhiWei(string OrgID, int ID, int start, int end, int status,
                                                                int year, string islocked)
        {
            return bo.GetZhaoLuZhiWei(OrgID, ID, start, end, status, year, islocked);
        }

        public bool DeteleZhaoLuZhiWei(string ID)
        {
            return bo.DeteleZhaoLuZhiWei(ID);
        }

        public bool SaveZhaoLuZhiWei(string ID)
        {
            return bo.SaveZhaoLuZhiWei(ID);
        }

        public string ChaKanShiFouDouShenHeZhaoLuZhiWei(string OrgID, int year, string islocked)
        {
            return bo.ChaKanShiFouDouShenHeZhaoLuZhiWei(OrgID, year, islocked);
        }

        public int GetZhaoLuZhiWeiCount(string OrgID, int ID, int status, int year, string islocked)
        {
            return bo.GetZhaoLuZhiWeiCount(OrgID,ID, status, year, islocked);
        }

        public bool CheckZhaoLuZhiWei(string ID)
        {
            return bo.CheckZhaoLuZhiWei(ID);
        }

        public bool TuiZhaoLuZhiWei(string ID, string memo)
        {
            return bo.TuiZhaoLuZhiWei(ID, memo);
        }

        public bool FaBuZhaoLuZhiWei(string ID)
        {
            return bo.FaBuZhaoLuZhiWei(ID);
        }

        public bool CancelZhaoLuZhiWei(string ID)
        {
            return bo.CancelZhaoLuZhiWei(ID);
        }

        public bool AddZhaoLuZhiWei(ZhaoLuZhiWeiModel item)
        {
            return bo.AddZhaoLuZhiWei(item);
        }
        
        public bool UpdateZhaoLuZhiWei(ZhaoLuZhiWeiModel item)
        {
            return bo.UpdateZhaoLuZhiWei(item);
        }

        public bool SuoZhaoLuZhiWei()
        {
            return bo.SuoZhaoLuZhiWei();
        }

        public ObservableCollection<ZhaoLuJiHuaModel> GetZhaoLuJiHuaModel(int year, string islocked)
        {
            return bo.GetZhaoLuJiHuaModel(year, islocked);
        }
        public ObservableCollection<ZhaoLuJiHuaDetailModel> GetZhaoLuJiHuaDetailModel(int id, int year)
        {
            return bo.GetZhaoLuJiHuaDetailModel(id, year);
        }
        public ObservableCollection<ZhaoLuJiHuaDetail1Model> GetZhaoLuJiHuaDetail1Model(int id, int year)
        {
            return bo.GetZhaoLuJiHuaDetail1Model(id, year);
        }

        public bool InsertZhaoLuJiHua(int ZhaoLuJiHua, ZhaoLuJiHuaDetailModel ZhaoLuJiHuaDetail,
                               ObservableCollection<ZhaoLuJiHuaDetail1Model> ZhaoLuJiHuaDetail1)
        {
            return bo.InsertZhaoLuJiHua(ZhaoLuJiHua, ZhaoLuJiHuaDetail, ZhaoLuJiHuaDetail1);
        }
        public int InsertZhaoLuJiHuaTitle(ZhaoLuJiHuaModel ZhaoLuJiHua)
        {
            return bo.InsertZhaoLuJiHuaTitle(ZhaoLuJiHua);
        }

        public bool DeleteZhaoLuJiHua(int id)
        {
            return bo.DeleteZhaoLuJiHua(id);
        }

        public FileTransferStream GetExcelFile(ZhaoLuJiHuaDetailModel model,
                                        ObservableCollection<ZhaoLuJiHuaDetail1Model> models, string username)
        {
            return bo.GetExcelFile(model, models, username);
        }

        public bool CanDaoRuAll(int year, int month)
        {
            return bo.CanDaoRuAll(year, month);
        }

        public bool ShanChongFu(int year, int month)
        {
            return bo.ShanChongFu(year,  month);
        }

        public bool DaoRuZhaoLuKaoSheng(ZhaoLu_DaoRuKaoShengModel model)
        {
            return bo.DaoRuZhaoLuKaoSheng(model);
        }

        public ObservableCollection<ZhaoLu_DaoRuKaoShengModel> GetZhaoLu_DaoRuKaoShengModel(int year, bool isfangqi, int month,int id)
        {
            return bo.GetZhaoLu_DaoRuKaoShengModel(year,isfangqi,month,id);
        }

        public Dictionary<int, int> GetZL_MianShiRenShu(int PublicOfficialSelectionID, int year)
        {
            return bo.GetZL_MianShiRenShu(PublicOfficialSelectionID, year);
        }

        public ObservableCollection<ZL_ZhiWeiShiJianAnPaiModel> ZL_PublicOfficialSelectionForAnPai(int year)
        {
            return bo.ZL_PublicOfficialSelectionForAnPai(year);
        }

        public ObservableCollection<ZL_ZhiWeiShiJianAnPaiModel> ZL_PublicOfficialSelectionForAnPaiSuoDing(int year)
        {
            return bo.ZL_PublicOfficialSelectionForAnPaiSuoDing(year);
        }

        public ObservableCollection<ZhaoLuZhiWeiModel> ZL_GetPublicOfficialSelectionForDaoChu(int year, string islocked)
        {
            return bo.ZL_GetPublicOfficialSelectionForDaoChu(year, islocked);
        }

        public bool ZL_InsertZu(ZL_ZhiWeiShiJianAnPaiModel model, string type)
        {
            return bo.ZL_InsertZu(model, type);
        }

        public bool QiQuan(string ID,string huanjie)
        {
            return bo.QiQuan(ID, huanjie);
        }

        public bool UpdateZL_MianShiFenShu(ZhaoLu_DaoRuKaoShengModel model)
        {
            return bo.UpdateZL_MianShiFenShu(model);
        }

        public bool NiTongYiorNot_ZL(List<int> PublicOfficialRecordID, string istongyi)
        {
            return bo.NiTongYiorNot_ZL(PublicOfficialRecordID, istongyi);
        }

        public bool UpdateZL_TiJian(ZhaoLu_DaoRuKaoShengModel model)
        {
            return bo.UpdateZL_TiJian(model);
        }
        
        public bool UpdateZL_ZhengShen(ZhaoLu_DaoRuKaoShengModel model)
        {
            return bo.UpdateZL_ZhengShen(model);
        }
    }
}
